

const path = require('path');
const staticImg = path.join(__dirname, 'static');

function ArduinoUnoBlocks(Blockly) {




    Blockly.Blocks['EXT_TWO_WAY_MOTOR_BLOCK_1607594494605'] = {
        init: function () {
            this.jsonInit({
                "message0": Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605,
                "args0": [

                    {
                        "type": "field_dropdown",
                        "name": "in1",
                        "options": [
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_0, '1'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_1, '2'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_2, '3'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_3, '4'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_4, '5'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_5, '6'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_6, '7'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_7, '8'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_8, '9'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_9, '10'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_10, '11'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_11, '12'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_12, '13'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_13, '14'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_14, '15'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_15, '16'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_16, '17'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_17, '18'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_18, '19'],

                        ]
                    },

                    {
                        "type": "field_dropdown",
                        "name": "in2",
                        "options": [
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_0, '1'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_1, '2'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_2, '3'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_3, '4'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_4, '5'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_5, '6'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_6, '7'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_7, '8'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_8, '9'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_9, '10'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_10, '11'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_11, '12'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_12, '13'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_13, '14'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_14, '15'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_15, '16'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_16, '17'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_17, '18'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_18, '19'],

                        ]
                    },

                    {
                        "type": "field_dropdown",
                        "name": "in3",
                        "options": [
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_0, '1'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_1, '2'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_2, '3'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_3, '4'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_4, '5'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_5, '6'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_6, '7'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_7, '8'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_8, '9'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_9, '10'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_10, '11'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_11, '12'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_12, '13'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_13, '14'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_14, '15'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_15, '16'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_16, '17'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_17, '18'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_18, '19'],

                        ]
                    },

                    {
                        "type": "field_dropdown",
                        "name": "in4",
                        "options": [
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_0, '1'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_1, '2'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_2, '3'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_3, '4'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_4, '5'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_5, '6'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_6, '7'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_7, '8'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_8, '9'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_9, '10'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_10, '11'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_11, '12'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_12, '13'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_13, '14'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_14, '15'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_15, '16'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_16, '17'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_17, '18'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_18, '19'],

                        ]
                    },

                    {
                        "type": "input_value",
                        "name": "speed1"
                    },

                    {
                        "type": "input_value",
                        "name": "speed2"
                    },

                ],
                "colour": "#FF0000",
                "extensions": ["shape_statement"]
            });
        }
    };


    Blockly.Blocks['EXT_TWO_WAY_MOTOR_BLOCK_STOP_1607594494606'] = {
        init: function () {
            this.jsonInit({
                "message0": Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_STOP_1607594494606,
                "args0": [

                    {
                        "type": "field_dropdown",
                        "name": "in1",
                        "options": [
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_0, '1'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_1, '2'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_2, '3'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_3, '4'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_4, '5'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_5, '6'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_6, '7'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_7, '8'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_8, '9'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_9, '10'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_10, '11'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_11, '12'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_12, '13'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_13, '14'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_14, '15'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_15, '16'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_16, '17'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_17, '18'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_18, '19'],

                        ]
                    },

                    {
                        "type": "field_dropdown",
                        "name": "in2",
                        "options": [
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_0, '1'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_1, '2'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_2, '3'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_3, '4'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_4, '5'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_5, '6'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_6, '7'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_7, '8'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_8, '9'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_9, '10'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_10, '11'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_11, '12'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_12, '13'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_13, '14'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_14, '15'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_15, '16'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_16, '17'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_17, '18'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_18, '19'],

                        ]
                    },

                    {
                        "type": "field_dropdown",
                        "name": "in3",
                        "options": [
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_0, '1'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_1, '2'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_2, '3'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_3, '4'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_4, '5'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_5, '6'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_6, '7'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_7, '8'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_8, '9'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_9, '10'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_10, '11'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_11, '12'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_12, '13'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_13, '14'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_14, '15'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_15, '16'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_16, '17'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_17, '18'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_18, '19'],

                        ]
                    },

                    {
                        "type": "field_dropdown",
                        "name": "in4",
                        "options": [
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_0, '1'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_1, '2'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_2, '3'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_3, '4'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_4, '5'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_5, '6'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_6, '7'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_7, '8'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_8, '9'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_9, '10'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_10, '11'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_11, '12'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_12, '13'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_13, '14'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_14, '15'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_15, '16'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_16, '17'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_17, '18'],
                            [Blockly.Msg.EXT_TWO_WAY_MOTOR_BLOCK_1607594494605_IN1_18, '19'],

                        ]
                    }

                    // {
                    //     "type": "input_value",
                    //     "name": "speed1"
                    // },

                    // {
                    //     "type": "input_value",
                    //     "name": "speed2"
                    // },

                ],
                "colour": "#FF0000",
                "extensions": ["shape_statement"]
            });
        }
    };

    return Blockly;
}

module.exports = ArduinoUnoBlocks;

